package org.example.medical.service.impl;

import org.example.medical.Mapper.DashboardMapper;
import org.example.medical.service.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DashboardServiceImpl implements DashboardService {

    @Autowired
    private DashboardMapper dashboardMapper;

    // 1. 获取就诊人次占比数据
    public List<Map<String, Object>> getVisitData() {
        return dashboardMapper.getVisitData();
    }

    // 2. 获取手术数量趋势数据
    public List<Map<String, Object>> getSurgeryTrend() {
        return dashboardMapper.getSurgeryTrend();
    }

    // 3. 获取当月出院环比数据
    public Map<String, Integer> getDischargeData() {
        return dashboardMapper.getDischargeData();
    }

    // 4. 获取病症诊断人数数据
    public List<Map<String, Object>> getDiseaseData() {
        return dashboardMapper.getDiseaseData();
    }

    // 5. 获取医疗耗材环比数据
    public List<Map<String, Object>> getSuppliesRatio() {
        return dashboardMapper.getSuppliesRatio();
    }

    // 6. 获取数据共享表格数据
    public List<Map<String, Object>> getSharedData() {
        return dashboardMapper.getSharedData();
    }

    // 7. 获取年龄分布数据
    public List<Map<String, Object>> getAgeDistribution() {
        return dashboardMapper.getAgeDistribution();
    }

    // 8. 获取人均医药费分布数据
    public List<Map<String, Object>> getCostDistribution() {
        return dashboardMapper.getCostDistribution();
    }

    // 9. 获取付费方式分布数据
    public List<Map<String, Object>> getPaymentDistribution() {
        return dashboardMapper.getPaymentDistribution();
    }
}
